<template>
	<view class="list-wraper">
		<view class="sequence-play">
			<text class="iconfont icon-bofang"></text>
			<view class="text">
				播放全部
			</view>
			<view class="count">
				(共{{playList.length}}首)
			</view>
		</view>
		<view class="song-list">
			<view class="item" v-for="(item,index) in playList" :key="index">
				<view class="count">
					{{ index + 1}}
				</view>
				<view class="content">
					<view class="name">
						{{ item.name }}
					</view>
					<view class="desc">
						{{ item.ar[0].name }}
					</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		props () {
			return {
				playList : playlist
			}
		},
		onLoad() {
			
		},
		created() {
			console.log(this.playlist)
		}
	}
</script>

<style lang="scss">
	.list-wraper{
		padding: 80upx 0 40upx;
		border-radius: 20upx;
		position: relative;
		top: -40upx;
		background: #f2f3f4;
		.sequence-play{
			position: absolute;
			top: 0;
			display: flex;
			align-items: center;
			width: 100%;
			height: 80upx;
			padding-left: 32upx;
			border-bottom: 1px solid #e4e4e4;
			.iconfont{
				font-size: 40upx;
				color: #2e3030;
				padding-right: 10upx
			}
			.text{
				font-size: 32upx;
				margin-right: 6upx;
			}
			.count{
				font-size: 28upx;
				color: #757575
			}
		}
		.song-list{
			.item{
				position: relative;
				display: flex;
				align-items: center;
				box-sizing: border-box;
				height: 120upx;
				border-bottom: 1px solid #e4e4e4;
				.count{
					flex: 0 0 100upx;
					width: 100upx;
					text-align: center;
					color: #757575;
					font-size: 32upx;
				}
				.content{
					flex: 1;
					line-height: 40upx;
					overflow: hidden;
					font-size: 30upx;
					.name{
						margin-top: 8upx;
						width: 80%;
						text-overflow: ellipsis;
						overflow: hidden;
						white-space: nowrap;
						color: #2e3030
					}
					.desc{
						text-overflow: ellipsis;
						overflow: hidden;
						white-space: nowrap;
						width: 80%;;
						font-size: 24upx;
						color: #757575;
					}
				}
			}
		}
	}
</style>
